package com.farm.farm.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.farm.common.entity.NumericalEntity;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.apache.ibatis.type.BigDecimalTypeHandler;

import java.math.BigDecimal;

@Data
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(description = "field")
@TableName(value = "field", keepGlobalPrefix = true, autoResultMap = true)
public class Field extends NumericalEntity {

    private Long farmId;

    private Long lesseeId;

    private Double length;

    private Double width;

    @TableField(typeHandler = BigDecimalTypeHandler.class)
    private BigDecimal price;

    private Byte status = 0;

    private Boolean enabled = true;

}
